<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="../admin/authority.jsp" %>
<html>
<head>
<%@include file="headScriptHH.jsp"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/assets/js/hh/cs35000script.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/assets/js/share/componentAPI.js"></script>
<!-- END JAVASCRIPT -->

</head>

<body>
	<div class="wrapper">
		<!-- BEGIN Top-Bar -->
		<%@ include file="../fragments/header.jsp"%>
		<!-- END Top-Bar -->

		<div id="detail-area" class="clearfix">
			<!-- BEGIN SIDEMENU -->
			<div class="hidden-xs hidden-sm page-sidebar" id="side-menu-bar">
				<ul class="page-sidebar-menu">					

					<!-- <div id="displaymenu"></div>  -->
					<%@ include file="../admin/menu.jsp" %>

				</ul>
			</div>
		<!-- End SIDEMENU-->

			<div class="col-sm-12 col-xs-12" id="right-side">
				<div id="navigator-bar">
					<i class="fa fa-home"></i> หน้าหลัก <i
						class="fa fa-angle-right ml-5 mr-5"></i> จัดลำดับการอ่านมาตร
				</div>
				<!--End navigator-bar-->
				<!-- Start detail-area -->
				<div>
					<div id="page-header" class="clearfix">
						<div>จัดลำดับการอ่านมาตร</div>
					</div>
					<!-- Start form-detail -->
					<div class="form-list clearfix" style="margin-top: -30px">
						<div class="search-box no-radius">
							<!-- header -->
							<div class="form-group clearfix search-header no-radius">
								<div class="pull-left">ระบุเขตการจัดลำดับการอ่านมาตร</div>
								<div class="pull-right">
									<div id="hide-button">
										<i class="fa fa-chevron-circle-up"></i>
									</div>
								</div>
							</div>
							<!-- BOX-BODY -->
							<div id="box-body">
								<div class="form-group clearfix mt-20 ">
									<div class="row ">
										<div class="col-xs-1"></div>
										<div class="col-xs-4">
											<label for="inputZone">เขต</label> <select
												class="form-control" id="inputZone" name="zone_id">
												<option value="">-- เลือกเขต --</option>
											</select>
										</div>
										<div class="col-xs-1"></div>
										<div class="col-xs-4">

											<label for="inputRoute">เส้นทาง</label> <select
												class="form-control" id="inputRoute" name="route_id">
												<option value="">-- เลือกเส้นทาง --</option>
											</select>
										</div>

									</div>

								</div>
								<!-- footer -->
								<div class="form-group mt-20 clearfix search-footer no-radius">
									<div class="col-sm-12 text-center">
										<button type="button" class="btn btn-primary"
											onclick="searchData();">
											<i class="fa fa-search"></i> ค้นหา
										</button>
									</div>
								</div>
							</div>
							<!-- END BOX-BODY -->
							<div class="modal fade" id="failZoneModal" tabindex="-1"
								role="dialog" aria-labelledby="failModal" aria-hidden="true">
								<div class="modal-dialog"  style="width: 400px;">
									<div class="modal-content">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal"
												aria-hidden="true">&times;</button>
											<h4 class="modal-title">กรุณาเลือกข้อมูลให้ถูกต้อง</h4>
										</div>
										<div class="modal-body">
											<div id="modal_content"><span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>กรุณาเลือกเขตและเส้นทางให้ถูกต้อง</div>
										</div>
										<div class="modal-footer" style="text-align: center;">

											<button type="button" class="btn btn-primary"
												 onclick="getFocus()"><i class="glyphicon glyphicon-ok"></i>ตกลง</button>
										</div>
									</div>
								</div>
							</div>
							<div class="modal fade" id="failCheckboxModal" tabindex="-1"
								role="dialog" aria-labelledby="failModal" aria-hidden="true">
								<div class="modal-dialog"  style="width: 400px;">
									<div class="modal-content">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal"
												aria-hidden="true">&times;</button>
											<h4 class="modal-title">กรุณาเลือกข้อมูลให้ถูกต้อง</h4>
										</div>
										<div class="modal-body">
											<div id="modal_content"><span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>กรุณาเลือกรายการที่ต้องการลบ</div>
										</div>
										<div class="modal-footer" style="text-align: center;">

											<button type="button" class="btn btn-primary" data-dismiss="modal" ><i class="glyphicon glyphicon-ok"></i>ตกลง</button>
										</div>
									</div>
								</div>
							</div>
							<div class="modal fade" id="confirmDeleteModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
								<div class="modal-dialog"  style="width: 400px;">
									<div class="modal-content">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal"	aria-hidden="true">&times;</button>
											<h4 class="modal-title">ลบข้อมูลลำดับการอ่านมาตร</h4>
										</div>
										<div class="modal-body">
											<div id="modal_content"><span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>ยืนยันการลบข้อมูลลำดับการอ่านมาตร</div>
										</div>
										<div class="modal-footer">
											<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="deleteData()"><i class="fa fa-floppy-o"></i>ยืนยัน</button>
											<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i>ยกเลิก</button>
										</div>
									</div>
								</div>
							</div>

						</div>
						<div class="pull-right" style="margin-top: 20px;">
							<button type="button" class="btn btn-primary"
								style="width: 75px;" onclick="submitForm('add')">เพิ่ม</button>
							<button type="button" class="btn btn-primary"
								style="width: 75px;" onclick="submitForm('delete')">ลบ</button>
						</div>

						<form name="addSequenceForm" id="addSequenceForm"
							action="CS35001Srvl"
							method="post">
                            <input type="hidden" id="inputCheckZoneId"  value="${pnZoneId}"/>
                            <input type="hidden" id="inputCheckRouteId" value="${pnRouteId}"/>   
							<input type="hidden" id="inputZoneId" name="zone_id" /> <input
								type="hidden" id="inputZoneName" name="zone_name"/> <input
								type="hidden" id="inputRouteId" name="route_id"/> <input
								type="hidden" id="inputRouteDescription"
								name="route_description"/> <input type="hidden"
								id="inputLastSequence" name="last_sequence"/> <input
								type="hidden" id="inputProcessType" name="process_type"
								value="goToAddSequence"/>


						</form>

					</div>

					<!-- End form-detail -->
					<div class="form-list" id="form-list" style="margin-top: -90px">
						
							<input type="hidden" id="url_address" name="url_address" value="">
							<input type="hidden" id="agent_browser" name="agent_browser"
								value="">
							<div class="list-detail-area">
								<table id="ManageSequenceRouteDetailDataTable"
									class="stripe hover cell-border" cellspacing="0" width="100%">
									<thead >
										<tr
											style="background-color: #399bca; color: white; font-size: 0.9em;">
											<th style="border-right: 1px solid #999"></th>
											<th style="border-right: 1px solid #999; text-align: center;">เขต</th>
											<th style="border-right: 1px solid #999; text-align: center;">เส้นทาง</th>
											<th style="border-right: 1px solid #999; text-align: center;">ทะเบียนผู้ใช้น้ำ</th>
											<th style="border-right: 1px solid #999; text-align: center;">ชื่อ
												- นามสกุ</th>
											<th style="border-right: 1px solid #999; text-align: center;">ลำดับการอ่านน้ำ</th>
										</tr>

									</thead>
								</table>


							</div>

						
					</div>
					<!-- End Form-list -->
				</div>
				<!-- End detail-area -->
				<div id="footer-detail">Copyright © สงวนลิขสิทธิ์ พ.ศ.2557 โดย
					การประปานครหลวง</div>
			</div>
		</div>
		<!-- End Detail-area-->
	</div>
	<!-- End Wrapper -->
</body>
</html>